package versuch_1;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

import javax.swing.WindowConstants;


/**
* This class file provides the second window for the GUI.
* @version 1.0
* @author Lenhard Egger
* 
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Window2 extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JScrollPane jScrollPane1;
	private JScrollPane jScrollPane2;
	private JTextArea jTextArea2;
	private JTextArea jTextArea1;
	private JLabel jLabel2;
	private JLabel jLabel1;
	private JPanel jPanel3;
	private JPanel jPanel2;
		
	public Window2() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jPanel1 = new JPanel();
				BorderLayout jPanel1Layout = new BorderLayout();
				jPanel1.setLayout(jPanel1Layout);
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				{
					jPanel3 = new JPanel();
					jPanel1.add(jPanel3, BorderLayout.CENTER);
					GridLayout jPanel3Layout = new GridLayout(1, 1);
					jPanel3Layout.setColumns(1);
					jPanel3Layout.setHgap(5);
					jPanel3Layout.setVgap(5);
					jPanel3.setLayout(jPanel3Layout);
					{
						jScrollPane1 = new JScrollPane();
						jPanel3.add(jScrollPane1);
						jScrollPane1.setPreferredSize(new java.awt.Dimension(197, 262));
						{
							jTextArea1 = new JTextArea();
							jScrollPane1.setViewportView(jTextArea1);
							jTextArea1.setEditable(false);
						}
					}
					{
						jScrollPane2 = new JScrollPane();
						jPanel3.add(jScrollPane2);
						jScrollPane2.setPreferredSize(new java.awt.Dimension(197, 262));
						{
							jTextArea2 = new JTextArea();
							jScrollPane2.setViewportView(jTextArea2);
							jTextArea2.setEditable(false);
						}
					}
				}
				{
					jPanel2 = new JPanel();
					GridLayout jPanel2Layout = new GridLayout(1, 1);
					jPanel2Layout.setColumns(1);
					jPanel2Layout.setHgap(5);
					jPanel2Layout.setVgap(5);
					jPanel1.add(jPanel2, BorderLayout.NORTH);
					jPanel2.setLayout(jPanel2Layout);
					jPanel2.setPreferredSize(new java.awt.Dimension(400, 16));
					{
						jLabel1 = new JLabel();
						jPanel2.add(jLabel1);
						jLabel1.setText("Eingelesener Text");
					}
					{
						jLabel2 = new JLabel();
						jPanel2.add(jLabel2);
						jLabel2.setText("Text Ausgabe");
					}
				}
			}
			pack();
			this.setSize(776, 375);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	/**
	 * This Method writes a String line into the Text area "Input Text".
	 * @param line The String variable who contains the text line to print into the text area.
	 */
	public void setInputText (String line){
		jTextArea1.append(line + '\n');
	}
	
	/**
	 * This Method writes a Char into the Text area "Output Text".
	 * @param x The Char who gets printed.
	 */
	public void setOutputText (char x){
		jTextArea2.append(Character.toString(x));
	}
}
